package counter.info;

public class FileTypeInfo implements Comparable<FileTypeInfo>{
    private String extension;

    private int linesNumber;

    private int filesNumber;

    public FileTypeInfo(String extension) {
        this.extension = extension;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public int getLinesNumber() {
        return linesNumber;
    }

    public void setLinesNumber(int linesNumber) {
        this.linesNumber = linesNumber;
    }

    public int getFilesNumber() {
        return filesNumber;
    }

    public void setFilesNumber(int filesNumber) {
        this.filesNumber = filesNumber;
    }

    public void incLinesNumber(int number) {
        linesNumber += number;
    }

    public void incFilesNumber() {
        filesNumber++;
    }

    @Override
    public int compareTo(FileTypeInfo o) {
        return Integer.valueOf(o.getLinesNumber()).compareTo(linesNumber);
    }
}
